<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <title>Title</title>
  <script type="text/javascript" src="./vue.min.js"></script>
</head>

<body>
  <div id="app">
    <my-parent :attrs="attrs" @inputchange="inputchange" />
  </div>

  <script>
    var child = {
      props:['attrs'],
      template: `
        <div>
          <lable>211</lable>
          <input @input="inputChange" v-bind="$attrs" v-for="(item,i) in attrs" :key="i"/>
        </div>
      `,
      methods: {
        inputChange(e){
          this.$emit('inputchange',e.target.value)
        }
      },
    }
    var parent={
      props:['attrs'],
      components:{
        'my-component': child
      },
      template:`
        <my-component placeholder="我是默认值" :attrs="attrs" v-on="$listeners"></my-component>
      `
    }
    var vue = new Vue({
      el: '#app',
      data:{
        attrs:[1,2,3,4,5]
      },
      components: {
        'my-parent':parent
      },
      methods:{
        inputchange(e){
          console.log(e,121212)
        }
      }
    });
  </script>
</body>

</html>